//
//  FPThirdView.m
//  ForestPack
//
//  Created by jimmy on 2018/7/4.
//  Copyright © 2018年 郑洲. All rights reserved.
//

#import "FPThirdView.h"
#import "Masonry.h"

@interface FPThirdView()

@property (nonatomic,strong)  UIButton  * qqButton;
@property (nonatomic,strong)  UIButton  * wechatButton;
@property (nonatomic,strong)  UIButton  * sinaButton;

@end

@implementation FPThirdView

-(void)layoutSubviews
{
    [super layoutSubviews];
    
    self.backgroundColor = [UIColor whiteColor];
    
    [self setViewUI];
}

-(void)setViewUI
{
    UIView *bottomView = [[UIView alloc] init];
    [self addSubview:bottomView];
    [bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.mas_left);
        make.bottom.equalTo(self.mas_bottom);
        make.width.equalTo(self.mas_width);
        make.height.equalTo(@(ScreenX375(100)));
    }];
    
    UILabel *label = [[UILabel alloc] init];
    [bottomView addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.equalTo(@(ScreenX375(102)));
        make.height.equalTo(@(ScreenX375(14)));
        make.centerX.equalTo(bottomView.mas_centerX);
        make.top.equalTo(bottomView.mas_top);
    }];
    label.text = @"第三方切换平台";
    label.textAlignment = NSTextAlignmentCenter;
    label.textColor = UIColorFromRGB(@"999999", 1);
    label.font = [UIFont fontWithName:@"PingFangSC-Regular" size:12];
    
    UIImageView *leftImageLine = [[UIImageView alloc] init];
    [bottomView addSubview:leftImageLine];
    [leftImageLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(label.mas_left).offset(-ScreenX375(10));
        make.width.equalTo(@(ScreenX375(70)));
        make.height.equalTo(@1);
        make.centerY.equalTo(label.mas_centerY);
    }];
    leftImageLine.backgroundColor = UIColorFromRGB(@"f4f4f4", 1);
    
    UIImageView *rightImageLine = [[UIImageView alloc] init];
    [bottomView addSubview:rightImageLine];
    [rightImageLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(label.mas_right).offset(ScreenX375(10));
        make.width.equalTo(@(ScreenX375(70)));
        make.height.equalTo(@1);
        make.centerY.equalTo(label.mas_centerY);
    }];
    rightImageLine.backgroundColor = UIColorFromRGB(@"f4f4f4", 1);
    
    self.qqButton = [[UIButton alloc] init];
    [bottomView addSubview:self.qqButton];
    [self.qqButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.mas_left).offset(ScreenX375(93));
        make.width.equalTo(@(ScreenX375(38)));
        make.height.equalTo(@(ScreenX375(38)));
        make.bottom.equalTo(bottomView.mas_bottom).offset(-(ScreenX375(40)));
    }];
    [self.qqButton setImage:[UIImage imageNamed:@"qq"] forState:UIControlStateNormal];
//    [self.qqButton addTarget:self action:@selector(qqLogin:) forControlEvents:UIControlEventTouchUpInside];
    
    self.sinaButton = [[UIButton alloc] init];
    [bottomView addSubview:self.sinaButton];
    [self.sinaButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.qqButton.mas_right).offset((SCREEN_WIDTH - ScreenX375(186) - ScreenX375(114))/2);
        make.width.equalTo(@(ScreenX375(38)));
        make.height.equalTo(@(ScreenX375(38)));
        make.bottom.equalTo(bottomView.mas_bottom).offset(-(ScreenX375(40)));
    }];
    [self.sinaButton setImage:[UIImage imageNamed:@"微博"] forState:UIControlStateNormal];
    //    [self.sinaButton addTarget:self action:@selector(sinaLogin:) forControlEvents:UIControlEventTouchUpInside];
    
    self.wechatButton = [[UIButton alloc] init];
    [bottomView addSubview:self.wechatButton];
    [self.wechatButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(bottomView.mas_right).offset(-ScreenX375(93));
        make.width.equalTo(@(ScreenX375(38)));
        make.height.equalTo(@(ScreenX375(38)));
        make.bottom.equalTo(bottomView.mas_bottom).offset(-ScreenX375(40));
    }];
    [self.wechatButton setImage:[UIImage imageNamed:@"微信"] forState:UIControlStateNormal];
    //    [self.wechatButton addTarget:self action:@selector(weixinLogin:) forControlEvents:UIControlEventTouchUpInside];

    
    
}

@end
